home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
tbbs
/
prgsourc.zip
/
HOMES.ZIP
/
PAREA.PRG
< prev
next >
Wrap
Text File
|
1996-01-13
|
10KB
|
302 lines
PROCEDURE parea
PARAMETERS md
PRIVATE cnt
PRIVATE x
PRIVATE y
PRIVATE page
SELECT b
COUNT TO cnt
GOTO TOP
PUBLIC aarea[cnt]
x = 1
DO WHILE x < cnt
aarea[x] = name
x = x + 1
SKIP
ENDDO
aarea[x] = name
IF cnt > 17
page = cnt
ELSE
page = 17
ENDIF
x = 1
t = 1
DO alist WITH t
y = 3
@ y,6 SAY aarea[x]
SET COLOR TO N/N
charin=" "
@ 2,0 GET charin
DO WHILE .T.
READ
DO CASE
CASE LastKey() = 5 && Up Arrow
IF y = 3
IF x # 1
x = x - page
t = x
DO alist WITH t
y = 19
@ y,6 SAY aarea[x]
ENDIF
LOOP
ENDIF
SET COLOR TO W+/N
@ y,6 SAY aarea[x]
y = y - 1
x = x - 1
SET COLOR TO GR+/B
@ y,6 SAY aarea[x]
LOOP
CASE LastKey() = 24 && Down Arrow
IF x = cnt
LOOP
ENDIF
IF y = 19
x = x + 1
t = x
DO alist WITH t
y = 3
@ y,6 SAY aarea[x]
LOOP
ENDIF
SET COLOR TO W+/N
@ y,6 SAY aarea[x]
y = y + 1
x = x + 1
SET COLOR TO GR+/B
@ y,6 SAY aarea[x]
LOOP
CASE LastKey() = 27 && <Esc>
IF md = 1
QUIT
ELSE
LOOP
ENDIF
CASE LastKey() = 63 && `?': Help
IF md = 1
DO cls WITH 2,0,20,79
SET COLOR TO GR+/N
@ 3,3 SAY "<Enter>"
@ 8,3 SAY "Cursor Keys"
@ 11,3 SAY "S"
@ 15,3 SAY "N"
SET COLOR TO BG/N
@ 3,11 SAY "Listings in highlited area"
@ 8,15 SAY "Move highlite"
@ 11,5 SAY "Search, all areas"
@ 15,5 SAY "New listings"
SET COLOR TO W+/N
@ 4,3 SAY "Shows all listings in the area selected. From this list, listings may be"
@ 5,3 SAY "viewed in full detail, downloaded, or tagged for view/download. Searching"
@ 6,3 SAY "within each area is also an option."
@ 9,3 SAY "The up and down arrow key allow moving of the highlite bar to select areas."
@ 12,3 SAY "Allows searching of entire database. Listings found in the search are"
@ 13,3 SAY "added to the download/view queue."
@ 16,3 SAY "Shows complete listing information for all listings for the last 30 days."
@ 17,3 SAY "Listings are automatically added to the download/view queue, and may be"
@ 18,3 SAY "removed from the queue by untagging"
@ 19,25 SAY "───── Any Key to Continue ─────"
key = InKey(100)
DO cls WITH 2,0,20,79
SET COLOR TO GR+/N
@ 3,3 SAY "D"
@ 8,3 SAY "?"
@ 11,3 SAY "<Esc>"
SET COLOR TO BG/N
@ 3,5 SAY "Download tagged listings"
@ 8,5 SAY "Help"
@ 11,9 SAY "Quit"
SET COLOR TO W+/N
@ 4,3 SAY "A file is created with the name `HOMEBASE.TXT' which contains all of the"
@ 5,3 SAY "listing information for every listing in the tag queue. The file is"
@ 6,3 SAY "downloaded to your computer and the Homebase program terminates."
@ 9,3 SAY "Displays this file."
@ 12,3 SAY "Quits Homebase program."
@ 19,25 SAY "───── Any Key to Continue ─────"
key = InKey(100)
DO cls WITH 2,0,20,79
DO alist WITH t
@ y,6 SAY aarea[x]
ELSE
LOOP
ENDIF
CASE LastKey() = 68 .OR. LastKey() = 100 && D or d: Download
IF md = 1
fnd = aScan(tarray,"EMPTY")
IF fnd > 1
fnd = fnd - 1
DO ty
DO BoxB WITH 5,18,10,60
@ 6,20 SAY "Listings to be downloaded: " + Ltrim(Str(fnd))
@ 8,20 SAY "Upon download, HomeBase will terminate."
@ 9,20 SAY "Do you want to download the listings?"
SET COLOR TO N/N
@ 2,0 GET charin
DO WHILE .T.
READ
DO CASE
CASE LastKey() = 89 .OR. LastKey() = 121 && `Y' or `y'
ok = .T.
DO make
IF .NOT. ok
DO cls WITH 2,0,20,79
DO BoxB WITH 6,24,9,53
@ 7,26 SAY "Download file not created."
@ 8,31 SAY "Notify Sysop."
key = InKey(4)
DO cls WITH 2,0,20,79
DO ta
DO alist WITH t
@ y,6 SAY aarea[x]
EXIT
ELSE
DOTBBS TYPE 34 OPTDATA "C:\HOMEBASE\TEXT /I:" + Chr(34) + "homebase.txt" + Chr(34)
ERASE C:\HOMEBASE\TEXT\homebase.txt"
QUIT
ENDIF
CASE LastKey() = 78 .OR. LastKey() = 110 && 'N' or 'n'
DO cls WITH 2,0,20,79
DO ta
DO alist WITH t
@ y,6 SAY aarea[x]
ok = .F.
EXIT
OTHERWISE
LOOP
ENDCASE
ENDDO
IF .NOT. ok
LOOP
ENDIF
ELSE
DO BoxB WITH 5,16,10,62
@ 6,18 SAY "No listings have been tagged for download."
@ 8,18 SAY "To tag listings, Select 'T' in List Screen,"
@ 9,18 SAY "or use Search to find desired listings."
DO cls WITH 2,0,20,79
DO ta
DO alist WITH t
@ y,6 SAY aarea[x]
LOOP
ENDIF
ELSE
LOOP
ENDIF
CASE LastKey() = 78 .OR. LastKey() = 110 && N or n: New listings
IF md = 1
DO new
SELECT b
DO cls WITH 2,0,20,79
SET COLOR TO GR+/R
@ 0,3 SAY city
@ 0,Col()+1 SAY "Real Estate Areas"
SET COLOR TO W+/R
@ 0,73 SAY "AREA "
DO ta
DO alist WITH t
@ y,6 SAY aarea[x]
ELSE
LOOP
ENDIF
CASE LastKey() = 83 .OR. LastKey() = 115 && S or s: Search
IF md = 1
DO sscr
SET COLOR TO GR+/R
@ 0,3 SAY "Search in " + city
DO search WITH 3
SET FORMAT TO fscr NOCLEAR
SELECT b
DO cls WITH 2,0,20,79
SET COLOR TO GR+/R
@ 0,3 SAY city
@ 0,Col()+1 SAY "Real Estate Areas"
SET COLOR TO W+/R
@ 0,73 SAY "AREA "
DO ta
DO alist WITH t
@ y,6 SAY aarea[x]
ELSE
LOOP
ENDIF
CASE LastKey() = 13 && <Enter>
IF md = 1
SEEK aarea[x]
larea = name
DO list
SELECT b
DO cls WITH 2,0,20,79
SET COLOR TO GR+/R
@ 0,3 SAY city
@ 0,Col()+1 SAY "Real Estate Areas"
SET COLOR TO W+/R
@ 0,73 SAY "AREA "
DO ta
DO alist WITH t
@ y,6 SAY aarea[x]
ELSE
SELECT e
REPLACE aname WITH aarea[x]
SELECT a
REPLACE area WITH aarea[x]
RELEASE aarea
EXIT
ENDIF
OTHERWISE
LOOP
ENDCASE
ENDDO
RETURN
**************************************************
PROCEDURE alist
PARAMETERS z
PRIVATE x
PRIVATE y
PRIVATE r
x = z
y = 3
r = 1
DO cls WITH 2,0,20,79
DO WHILE y < 20
SEEK aarea[x]
SET COLOR TO GR+/N
@ y,1 SAY "["
@ y,2 SAY r PICTURE "@Z 99"
@ y,4 SAY "]"
SET COLOR TO W+/N
@ y,6 SAY name
SET COLOR TO G/N
@ y,20 SAY define
IF x = Len(aarea)
EXIT
ENDIF
x = x + 1
y = y + 1
r = r + 1
ENDDO
SET COLOR TO GR+/B
RETURN